﻿<Application x:Class="Coogle.App"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             StartupUri="MainWindow.xaml">
    <Application.Resources>
        <Style x:Key="MainContent"
               TargetType="{x:Type ContentControl}">
            <Setter Property="Height"
                    Value="Auto" />
            <Setter Property="Width"
                    Value="Auto" />
            <Setter Property="Margin"
                    Value="10" />
            <Setter Property="HorizontalAlignment"
                    Value="Stretch" />
            <Setter Property="VerticalAlignment"
                    Value="Stretch" />
            <Setter Property="HorizontalContentAlignment"
                    Value="Stretch" />
            <Setter Property="VerticalContentAlignment"
                    Value="Stretch" />            
        </Style>
        <Style x:Key="ModuleContentBorder"
               TargetType="{x:Type Border}">
            <Setter Property="Width"
                    Value="Auto" />
            <Setter Property="Height"
                    Value="Auto" />
            <Setter Property="VerticalAlignment"
                    Value="Stretch" />
            <Setter Property="HorizontalAlignment"
                    Value="Stretch" />
            <Setter Property="Margin"
                    Value="0,5,0,5" />
            <Setter Property="CornerRadius"
                    Value="4,4,4,4" />
            <Setter Property="BorderBrush"
                    Value="Black" />
            <Setter Property="Background"
                    Value="White" />
            <Setter Property="BorderThickness"
                    Value="1" />
        </Style>
        <Style x:Key="ModuleHeader"
               TargetType="{x:Type HeaderedContentControl}">
            <Setter Property="HeaderTemplate">
                <Setter.Value>
                    <DataTemplate>
                        <Border BorderBrush="LightGray"
                                Background="#FF77B6EB"
                                BorderThickness="1"
                                CornerRadius="5"
                                Margin="4"
                                Padding="4"
                                SnapsToDevicePixels="True">
                            <TextBlock FontSize="18"
                                       FontWeight="Bold"
                                       Foreground="White"
                                       HorizontalAlignment="Center"
                                       Text="{TemplateBinding Content}" />
                        </Border>
                    </DataTemplate>
                </Setter.Value>
            </Setter>
            <Setter Property="IsTabStop"
                    Value="False" />
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type HeaderedContentControl}">
                        <DockPanel>
                            <ContentPresenter DockPanel.Dock="Top"
                                              ContentSource="Header"
                                              ContentTemplate="{TemplateBinding HeaderTemplate}" />
                            <ContentPresenter ContentSource="Content"
                                              ContentTemplate="{TemplateBinding ContentTemplate}" />
                        </DockPanel>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
   </Application.Resources>
</Application>
